package com.tiancheng.trade.order.service;

import com.tiancheng.trade.commom.core.data.PageInfo;
import com.tiancheng.trade.commom.core.exception.BusinessException;
import com.tiancheng.trade.order.bo.InvoiceOrderBO;
import com.tiancheng.trade.order.bo.InvoiceResultBO;
import com.tiancheng.trade.order.vo.app.InvoiceMakeVO;
import com.tiancheng.trade.order.vo.app.InvoiceOrderQueryVO;
import com.tiancheng.trade.order.vo.app.res.InvoiceMakeResVO;
import com.tiancheng.trade.order.vo.app.res.InvoiceOrderDetailResVO;
import com.tiancheng.trade.order.vo.app.res.InvoiceOrderQueryResVO;

/**
 * 开票订单Service接口
 *
 * @author kellen
 * @date 2024/6/25
 */
public interface InvoiceOrderService {

    /**
     * 同步订单可开票明细
     * @param invoiceOrderBO
     */
    void syncInvoiceItems(InvoiceOrderBO invoiceOrderBO);

    /**
     * 同步订单可开票明细，并直接开票
     * @param invoiceOrderBO
     */
    void syncInvoiceItemsAndMake(InvoiceOrderBO invoiceOrderBO);

    /**
     * 查询用户的可开票订单列表
     * @param uid
     * @param queryVO
     * @return
     */
    PageInfo<InvoiceOrderQueryResVO> query(String uid, InvoiceOrderQueryVO queryVO);

    /**
     * 用户开具发票
     * @param uid
     * @param invoiceMakeVO
     * @return
     */
    InvoiceMakeResVO make(String uid, InvoiceMakeVO invoiceMakeVO) throws BusinessException;

    /**
     * 获取可开票订单的详细
     * @param uid
     * @param orderId
     * @return
     */
    InvoiceOrderDetailResVO detail(String uid, String orderId);

    /**
     * 开票结果
     * @param invoiceResultBO
     */
    void invoiceResult(InvoiceResultBO invoiceResultBO);

    /**
     * 重新开票
     * @param uid
     * @param invoiceMakeVO
     */
    void reset(String uid, InvoiceMakeVO invoiceMakeVO) throws BusinessException;
}
